package ogloszenia.widok;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.ManagedProperty;
import javax.faces.bean.SessionScoped;
import javax.faces.context.FacesContext;

@ManagedBean 
@SessionScoped
public class SkinBean {

	private String[] skin_={
	"emeraldTown",
	"blueSky",
	"wine",
	"japanCherry",
	"ruby",
	"classic",
	"deepMarine"};

	//@ManagedProperty
	private String skin="wine";
	
	public String getSkin() {
		return skin;
	}

	public void setSkin(String skin) {
		this.skin = skin;
	}

	private static int aa=0;
	
	public static int getAa() {
		return aa;
	}

	public static void setAa(int aa) {
		SkinBean.aa = aa;
	}

	public void zmien(){
		FacesContext d=FacesContext.getCurrentInstance();
		skin=d.getExternalContext().getInitParameter("org.richfaces.skin");
		d.getExternalContext().getInitParameter("org.richfaces.skin");
		//skin=
		/*if(aa==(Integer)skin_.length)
			aa=0;
		else
			aa++;
		skin=skin_[aa];*/
	}
	
}
